package com.qingzhuge.sys.entity;

import com.qingzhuge.common.enums.EMemberLoginType;
import com.qingzhuge.entity.BaseBean;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;

/**
 * @author : zero.xiao
 * @description : 系统基础配置
 * @date :2018/6/8 0008 下午 15:02
 * @modified :
 * @since : 1.0.0
 */
@EqualsAndHashCode(callSuper = true)
@Setter
@Getter
public class SysSiteConfig extends BaseBean<Long> {
    private static final long serialVersionUID = 5256975231281277954L;
    @Transient
    private Long id;
    /**
     * 系统配置信息
     */
    public final static String SYS_SITE_CONFIG_KEY = "SYS_SITE_CONFIG_KEY";
    /**系统正常开启*/
    private boolean enable = true;
    /**系统名称*/
    @NotBlank(message = "系统名称不能为空")
    private String name;
    /**系统域名*/
    private String url;
    /**系统版本号*/
    private String version;
    /**系统简介*/
    private String make;
    /**系统介绍*/
    private String remark;
    /**联系地址*/
    private String addr;
    /**联系电话*/
    private String tel;
    /**联系QQ*/
    private String qq;
    /**联系旺旺*/
    private String wangwang;
    /**淘宝店铺地址*/
    private String taobaoShop;
    /**LOGO*/
    private String logo;
    /**搜索引擎seo*/
    private String seo;
    /**搜索引擎关键词*/
    private String keywork;
    /**总ip量*/
    private Long ip = 0L;
    /**总访问量*/
    private Long vp = 0L;
    /*===========后台账号相关*/

    /**后台密码最小长度*/
    private int adminPwdMinLength = 6;
    /**后台密码最大长度*/
    private int adminPwdMaxLength = 16;
    /**后台初始化密码*/
    private String adminDefPassword = "123456";
    /**后台登录验证码*/
    private boolean adminKaptcha = false;
    /**后台登录短信验证码*/
    private boolean adminSmsCodeLogin = false;
    /**后台注册短信验证码*/
    private boolean adminSmsCodeRegister = false;
    /**开启后台账号注册和找回密码*/
    private boolean adminRegister = false;
    private boolean adminRestPassword = false;

    /*==========会员账号相关*/

    /**会员登录验证码*/
    private boolean memberKaptcha = false;
    /**开启会员注册短信验证码*/
    private boolean memberSmsCodeRegister = false;
    /**开启会员登录短信验证码*/
    private boolean memberSmsCodeLogin = false;
    /**会员登录类型*/
    private EMemberLoginType memberLoginType = EMemberLoginType.usernameAndPwd;
    /**会员初始化密码*/
    private String memberDefPassword = "X123456789";
    /**会员token过期时间,单位秒*/
    private Integer memberTokenTime = 604800;
    /**开启会员登录时用户不存在就注册新用户*/
    private boolean memberLoginNotRegister = false;
    /**测试用,开启无需验证码手机号登录,为空表示不开启*/
    private String memberDebugMobile;
    /**开启会员账号注册和找回密码*/
    private boolean memberRegister = false;
    private boolean memberRestPassword = false;
}
